const http = require('http')

const server = http.createServer((req, res) => {
  // console.log(req.headers);
  // res.end('hello')
  if (req.url === '/home') {
    // 做数据库的连接
    // 执行sql语句
    res.end('首页数据')
  }
  
})
server.listen(3000, () => {
  console.log('server is running');
  
})